package com.airbnb.mvrx.sample.features.book.views

import android.content.Context
import android.widget.FrameLayout
import android.widget.TextView
import com.airbnb.epoxy.ModelProp
import com.airbnb.epoxy.ModelView
import com.example.mvrxstudy.R

@ModelView(autoLayout = ModelView.Size.MATCH_WIDTH_WRAP_HEIGHT)
class BookDetailIntro @JvmOverloads constructor(context: Context) : FrameLayout(context) {

    private val mDesc: TextView

    init {
        inflate(context, R.layout.view_intro_book_detail, this)
        mDesc = findViewById(R.id.tv_desc)
    }

    @ModelProp
    fun setDesc(desc: String) {
        mDesc.text = desc
    }

}